package com.example.wac.service;

import com.example.wac.vo.ApiResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * @author wuancheng
 * @description
 * @date 2022-01-19 17:47:00
 */

public interface CommonService {

    /**
     * 上传文件到本地
     *
     * @param file
     * @return
     */
    ApiResult upLoadLocalFile(MultipartFile file);

    /**
     * 下载文件到本地
     *
     * @param file
     * @return
     */
    ApiResult upLoadLocalFileTransfer(MultipartFile file);

    /**
     * 下载到本地文件
     *
     * @param response
     * @param fileName
     */
    void downLoadLocalFile(HttpServletResponse response, String fileName);

}
